﻿using Compass.LogisticService.Domain.Entities;
using MediatR;
using Microsoft.EntityFrameworkCore;
using Zack.Infrastructure.EFCore;

namespace Compass.LogisticService.Infrastructure;

public class LogisticDbContext : BaseDbContext
{
    public DbSet<ImportExportInfo> ImportExportInfos { get; set; }
    public LogisticDbContext(DbContextOptions<LogisticDbContext> options, IMediator? mediator) : base(options, mediator)
    {
    }
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);
        modelBuilder.ApplyConfigurationsFromAssembly(GetType().Assembly);
        modelBuilder.EnableSoftDeletionGlobalFilter();
    }
}